package com.ruoyi.stuinfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stuinfo.mapper.StudentPunishMapper;
import com.ruoyi.stuinfo.domain.StudentPunish;
import com.ruoyi.stuinfo.service.IStudentPunishService;

/**
 * 处罚查询Service业务层处理
 *
 * @author zc
 * @date 2025-05-18
 */
@Service
public class StudentPunishServiceImpl implements IStudentPunishService
{
    @Autowired
    private StudentPunishMapper studentPunishMapper;

    /**
     * 查询处罚查询
     *
     * @param punishmentId 处罚查询主键
     * @return 处罚查询
     */
    @Override
    public StudentPunish selectStudentPunishByPunishmentId(Long punishmentId)
    {
        return studentPunishMapper.selectStudentPunishByPunishmentId(punishmentId);
    }

    /**
     * 查询处罚查询列表
     *
     * @param studentPunish 处罚查询
     * @return 处罚查询
     */
    @Override
    public List<StudentPunish> selectStudentPunishList(StudentPunish studentPunish)
    {
        return studentPunishMapper.selectStudentPunishList(studentPunish);
    }

    /**
     * 新增处罚查询
     *
     * @param studentPunish 处罚查询
     * @return 结果
     */
    @Override
    public int insertStudentPunish(StudentPunish studentPunish)
    {
        return studentPunishMapper.insertStudentPunish(studentPunish);
    }

    /**
     * 修改处罚查询
     *
     * @param studentPunish 处罚查询
     * @return 结果
     */
    @Override
    public int updateStudentPunish(StudentPunish studentPunish)
    {
        return studentPunishMapper.updateStudentPunish(studentPunish);
    }

    /**
     * 批量删除处罚查询
     *
     * @param punishmentIds 需要删除的处罚查询主键
     * @return 结果
     */
    @Override
    public int deleteStudentPunishByPunishmentIds(Long[] punishmentIds)
    {
        return studentPunishMapper.deleteStudentPunishByPunishmentIds(punishmentIds);
    }

    /**
     * 删除处罚查询信息
     *
     * @param punishmentId 处罚查询主键
     * @return 结果
     */
    @Override
    public int deleteStudentPunishByPunishmentId(Long punishmentId)
    {
        return studentPunishMapper.deleteStudentPunishByPunishmentId(punishmentId);
    }

    @Override
    public List<StudentPunish> selectStudentPunishList_handteacher(String teacherId) {
        return studentPunishMapper.selectStudentPunishList_handteacher(teacherId);
    }

    @Override
    public int insertStudentPunishs(List<StudentPunish> studentPunishes) {
        return studentPunishMapper.insertStudentPunishs(studentPunishes);
    }
}
